In recent years, some relaying apparatuses, such as switches and routers, which relay a packet, come to have a function called Quality of Service (QoS) for ensuring communication quality. Examples of the function for ensuring communication quality include bandwidth control for achieving data transmission with a lowest bandwidth under contract with each user, priority control for relaying packets in descending order of priority set in each packet, and congestion control for controlling a transfer rate according to the load state on a network.
Specifically, the congestion control is achieved, for example, by: determining whether the amount of received packets is equal to or greater than a predetermined threshold or not according to the priority set for each packet; and, after the amount of received packets reaches the predetermined threshold (when the congestion occurs), discarding the packet received thereafter (refer to Japanese Patent Application Laid-open No. 2004-166080 and Japanese Patent Application Laid-open No. 11-112544).
Meanwhile, Virtual Local Area Networks (VLANs) have become widely used in recent years. The VLAN is a virtual network created in a physical network. Communication providers and users of VLANs desire to realize congestion control for each virtual network.
However, in the conventional technology, although congestion control can be performed for each priority, congestion control cannot be performed for each virtual network. Specifically, in a conventional relaying apparatus, when the amount of received packets of a predetermined priority exceeds a threshold, packets of the predetermined priority are discarded thereafter regardless of a virtual network to which an apparatus that transmits the packet belongs. Thus, congestion control by the conventional relaying apparatus does not take difference in virtual networks into consideration.